package cn.tedu.csmall.product.schedule;

import cn.tedu.csmall.product.service.IBrandService;
import io.swagger.annotations.ApiImplicitParam;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

@Slf4j
@Component
public class CacheSchedule {

    @Autowired
    private IBrandService brandService;
    @Scheduled(fixedRate = 1*60*60*1000)
    public void loadBrandsToCache(){
        log.debug("执行计划任务。。。");
        brandService.loadBrandsToCache();
    }
}
